const Router = require('koa-router')
const router = new Router()
const studentUtils = require('../controller/student')
const classUtils = require('../controller/class')
const homeworkUtils = require('../controller/homework')
const userUtils = require('../controller/user')

router.post('/homework', homeworkUtils.addHomework)
router.put('/homework/:id', homeworkUtils.updateHomework)
router.get('/homework/:id', homeworkUtils.getHomework)
router.get('/homeworks', homeworkUtils.getHomeworkList)

router.post('/class', classUtils.addClass)
router.get('/classes', classUtils.getClassList)

router.post('/student', studentUtils.addStudent)
router.get('/students', studentUtils.getStudentList)

router.post('/user', userUtils.addUser)
router.get('/users', userUtils.getUserList)

module.exports = router.routes()
